unit Splash;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, ComCtrls, Version;

type
  TSplashForm = class(TForm)
    Panel: TPanel;
    Image: TImage;
    StatusBar: TStatusBar;
    procedure FormCreate(Sender: TObject);
    procedure ImageClick(Sender: TObject);
  end;

var
  SplashForm: TSplashForm;

implementation

uses devcfg;

{$R *.DFM}

procedure TSplashForm.FormCreate(Sender: TObject);
begin
  if (devData.Splash <> '') and FileExists(devData.Splash) then
   begin
     Image.Picture.LoadFromFile(devData.Splash);
     ClientWidth:= Image.Width;
     ClientHeight:= Image.Height + StatusBar.Height;
   end;
  StatusBar.SimpleText := 'Bloodshed Dev-C++ '+ DEVCPP_VERSION +'. Loading...';
end;

procedure TSplashForm.ImageClick(Sender: TObject);
begin
  close;
end;

end.
